from socket import *

HOST='172.18.247.77'#'napp-pc01355' gethostname()
PORT=21567
BUFSIZ=1024
ADDR=(HOST,PORT)

tcpCliSock=socket(AF_INET,SOCK_STREAM)
tcpCliSock.connect(ADDR)

while True:
    data = input('>>>>>')
    if not data:
        break
    tcpCliSock.send(data.encode())
    data=tcpCliSock.recv(BUFSIZ)
    if not data:
        break
    print(data)

tcpCliSock.close()
